package com.baymax.study.base.infrastructure.filters;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;

/**
 * RequestContextFilter
 *
 * @author Baymax
 * @since 2024-07-22
 */
@Component
public class MyRequestContextFilter implements Filter {
    private static final Logger LOGGER = LoggerFactory.getLogger(MyRequestContextFilter.class);

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
        throws IOException, ServletException {
        LOGGER.info("MyRequestContextFilter doFilter start.");
        filterChain.doFilter(servletRequest, servletResponse);
    }
}
